{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 19,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "application/vnd.jupyter.widget-view+json": {
       "model_id": "a6f93b0688da4024b5ff4138716925ee",
       "version_major": 2,
       "version_minor": 0
      },
      "text/plain": [
       "HBox(children=(FigureWidget({\n",
       "    'data': [{'line': {'color': 'rgb(31, 119, 180)'},\n",
       "              'mode': 'lin…"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "import tensorwatch as tw\n",
    "from tensorwatch.plotly.line_plot import LinePlot\n",
    "\n",
    "stream = tw.ArrayStream([(i, i*i) for i in range(50)], stream_name='test1' )\n",
    "stream2 = tw.ArrayStream([(i, i*i*0.5) for i in range(50)], stream_name='test2')\n",
    "\n",
    "line_plot = LinePlot()\n",
    "\n",
    "\n",
    "line_plot.subscribe(stream, ytitle='y1')\n",
    "\n",
    "line_plot.subscribe(stream2, ytitle='y2')\n",
    "\n",
    "line_plot.show()\n",
    "\n",
    "stream.load()\n",
    "stream2.load()\n",
    "\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "base",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.11.3"
  },
  "orig_nbformat": 4,
  "vscode": {
   "interpreter": {
    "hash": "16f5b46f222e2a3e8d4adbf7141cae37b71ed37616e60735fa5d1164a1bc3ada"
   }
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
